import { TdBaseTableProps } from 'tdesign-vue';

interface DashboardPanel {
  title: string;
  number: string | number;
  leftType: string;
  upTrend?: string;
  downTrend?: string;
}

interface TendItem {
  growUp?: number;
  productName: string;
  count: number;
  date: string;
}

// 表格数据
export const PANE_LIST: Array<DashboardPanel> = [
  {
    title: '总活跃用户',
    number: '28,425.00',
    upTrend: '20.5%',  // 自从上周上涨
    leftType: 'echarts-line',
    iconlist: 'user-circle',
    stylelist: 'color: #fff;'
  },
  {
    title: '总会员数',
    number: '768.00',
    downTrend: '30.5%',
    leftType: 'echarts-bar',
    iconlist: 'logo-android'
  },
  {
    title: '当月用户总约局总数',
    number: '1126',
    downTrend: '60.5%',
    leftType: 'icon-usergroup',
    iconlist: 'usergroup'
  },
  {
    title: '包厢订单总数',
    number: 527,
    downTrend: '10%',
    leftType: 'icon-file-paste',
    iconlist: 'usb'
  },
];

// 当月用户最喜爱剧本类型
export const SALE_TEND_LIST: Array<TendItem> = [
  {
    growUp: 1,
    productName: '演绎类',
    count: 7059,
    date: '2021-09-01',
  },
  {
    growUp: -1,
    productName: '推理类',
    count: 6437,
    date: '2021-09-01',
  },
  {
    growUp: 4,
    productName: '情感类',
    count: 4221,
    date: '2021-09-01',
  },
  {
    growUp: 3,
    productName: '搞笑类',
    count: 3317,
    date: '2021-09-01',
  },
  {
    growUp: -3,
    productName: '装扮类',
    count: 3015,
    date: '2021-09-01',
  },
  {
    growUp: -3,
    productName: '行动类',
    count: 2015,
    date: '2021-09-12',
  },
];

// 收入头部 
export const BUY_TEND_LIST: Array<TendItem> = [
  {
    growUp: 1,
    productName: '门店包厢收入',
    count: 3015,
    date: '2021-09-01',
  },
  {
    growUp: -1,
    productName: '门店餐饮收入',
    count: 2015,
    date: '2021-09-01',
  },
  {
    growUp: 6,
    productName: '门店租凭收入',
    count: 1815,
    date: '2021-09-11',
  },
  {
    growUp: -3,
    productName: '游戏收入',
    count: 1015,
    date: '2021-09-21',
  },
  {
    growUp: -4,
    productName: '总收入',
    count: 445,
    date: '2021-09-19',
  },
  {
    growUp: -3,
    productName: '净利润',
    count: 2015,
    date: '2021-09-12',
  },
];

// 当月最喜爱剧本类型头部
export const SALE_COLUMNS: TdBaseTableProps['columns'] = [
  {
    align: 'center',
    colKey: 'index',
    title: '排名',
    width: 80,
    fixed: 'left',
  },
  {
    align: 'left',
    ellipsis: true,
    colKey: 'productName',
    title: '类别',
    minWidth: 100,
  },
  {
    align: 'center',
    colKey: 'growUp',
    width: 100,
    title: '较上周',
  },
  {
    align: 'center',
    colKey: 'count',
    title: '订单量',
    width: 100,
  },
  {
    align: 'center',
    colKey: 'date',
    width: 140,
    title: '时间',
  },
  {
    align: 'center',
    colKey: 'operation',
    title: '操作',
    width: 80,
    fixed: 'right',
  },
];

// 收入列表排行
export const BUY_COLUMNS: TdBaseTableProps['columns'] = [
  {
    align: 'center',
    colKey: 'index',
    title: '排名',
    width: 80,
    fixed: 'left',
  },
  {
    align: 'left',
    ellipsis: true,
    colKey: 'productName',
    title: '收入名称',
    minWidth: 100,
  },
  {
    align: 'center',
    colKey: 'growUp',
    width: 100,
    title: '较上周',
  },
  {
    align: 'center',
    colKey: 'count',
    title: '订单量',
    width: 100,
  },
  {
    align: 'center',
    colKey: 'date',
    width: 140,
    title: '日期',
  },
  {
    align: 'center',
    colKey: 'operation',
    title: '操作',
    width: 80,
    fixed: 'right',
  },
];
